package com.zy.web.repository;

import com.zy.web.domain.ZyCompetition;
import org.apache.commons.collections4.Get;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ZyCompetitionRepository extends JpaRepository<ZyCompetition, String>, JpaSpecificationExecutor<ZyCompetition> {

    @Query("select id as id ,csz as csz from ZyCompetition")
    List<IdAndCsz> findAllIdAndCsz();
    interface IdAndCsz{
        String getId();
        String getCsz();
    }
}
